package vip.sone.eureka.consumer.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.loadbalancer.LoadBalancerClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import vip.sone.eureka.consumer.ConsumerClient;

/**
 * 注入Feign客户端用来调用服务提供方接口
 *
 * @author winstone jianwenzhen@qq.com
 * @date 19-4-12 下午4:42
 */
@Slf4j
@RestController
public class ConsumerController {

	@Autowired
	ConsumerClient client;

	@GetMapping("/consume")
	public String consume() {
		return client.consume();
	}
}
